package com.oceansoft.mobile.econsole.exam.service;

import com.oceansoft.mobile.econsole.exam.entity.Attach;
import com.oceansoft.mobile.econsole.exam.entity.ExamTest;
import com.oceansoft.mobile.econsole.exam.entity.Option;
import com.oceansoft.mobile.econsole.exam.entity.Questions;
import com.oceansoft.mobile.econsole.modules.base.entity.Pager;
import com.oceansoft.mobile.econsole.modules.base.entity.Query;
import com.oceansoft.mobile.econsole.modules.base.entity.Result;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by 祝亚 on 2016/8/17.
 */
public interface IExamService {

    Pager<ExamTest> findTestByCondition(Query query);

    Result saveOrUpdateExamTest(ExamTest examTest) throws Exception;

    Result deleteExamTest(int id) throws Exception;

    ExamTest getExamTestById(int id);

    Pager<Questions> findQuestionByCondition(Query query);

    Questions getQuestionById(int id);

    List<Option> findOptionByQuestionId(int id);

    List<Attach> findAttachByQuestionId(int id,String type);

    Result saveQuestions(Questions questions, MultipartHttpServletRequest request) throws Exception;

    Attach getAttachById(int id);

    List<ExamTest> findAllTest();
}
